package com.clkj.mobileinspector.model.bean;

import java.util.List;

/**
 * @author 松
 * 2020/9/21 11:25
 * 操作类 增删改
 */
public class OperationBean  {

    /**
     * messageId : d63873b6779042eebcbde0b8613e27b6
     * version : 1.0
     * parameter : {"transaction":1,"operations":[{"operationType":2,"operationId":"1","dataObjId":"czrk","regionalismCode":"","networkCode":"","condition":{"logicalOperate":"and","keyValueList":[{"key":"id","relationOperator":"=","value":"10"}]},"data":[{"fieldValues":[{"field":"status","value":"1"}]}]}]}
     */

    private String messageId;
    private String version;
    private ParameterBean parameter;

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public ParameterBean getParameter() {
        return parameter;
    }

    public void setParameter(ParameterBean parameter) {
        this.parameter = parameter;
    }

    public static class ParameterBean {
        /**
         * transaction : 1
         * operations : [{"operationType":2,"operationId":"1","dataObjId":"czrk","regionalismCode":"","networkCode":"","condition":{"logicalOperate":"and","keyValueList":[{"key":"id","relationOperator":"=","value":"10"}]},"data":[{"fieldValues":[{"field":"status","value":"1"}]}]}]
         */

        private int transaction;
        private List<OperationsBean> operations;

        public int getTransaction() {
            return transaction;
        }

        public void setTransaction(int transaction) {
            this.transaction = transaction;
        }

        public List<OperationsBean> getOperations() {
            return operations;
        }

        public void setOperations(List<OperationsBean> operations) {
            this.operations = operations;
        }

        public static class OperationsBean {
            /**
             * operationType : 2
             * operationId : 1
             * dataObjId : czrk
             * regionalismCode :
             * networkCode :
             * condition : {"logicalOperate":"and","keyValueList":[{"key":"id","relationOperator":"=","value":"10"}]}
             * data : [{"fieldValues":[{"field":"status","value":"1"}]}]
             */

            private int operationType;
            private String operationId;
            private String dataObjId;
            private String regionalismCode;
            private String networkCode;
            private ConditionBean condition;
            private List<DataBean> data;

            public int getOperationType() {
                return operationType;
            }

            public void setOperationType(int operationType) {
                this.operationType = operationType;
            }

            public String getOperationId() {
                return operationId;
            }

            public void setOperationId(String operationId) {
                this.operationId = operationId;
            }

            public String getDataObjId() {
                return dataObjId;
            }

            public void setDataObjId(String dataObjId) {
                this.dataObjId = dataObjId;
            }

            public String getRegionalismCode() {
                return regionalismCode;
            }

            public void setRegionalismCode(String regionalismCode) {
                this.regionalismCode = regionalismCode;
            }

            public String getNetworkCode() {
                return networkCode;
            }

            public void setNetworkCode(String networkCode) {
                this.networkCode = networkCode;
            }

            public ConditionBean getCondition() {
                return condition;
            }

            public void setCondition(ConditionBean condition) {
                this.condition = condition;
            }

            public List<DataBean> getData() {
                return data;
            }

            public void setData(List<DataBean> data) {
                this.data = data;
            }

            public static class ConditionBean {
                /**
                 * logicalOperate : and
                 * keyValueList : [{"key":"id","relationOperator":"=","value":"10"}]
                 */

                private String logicalOperate;
                private List<KeyValueListBean> keyValueList;

                public String getLogicalOperate() {
                    return logicalOperate;
                }

                public void setLogicalOperate(String logicalOperate) {
                    this.logicalOperate = logicalOperate;
                }

                public List<KeyValueListBean> getKeyValueList() {
                    return keyValueList;
                }

                public void setKeyValueList(List<KeyValueListBean> keyValueList) {
                    this.keyValueList = keyValueList;
                }

                public static class KeyValueListBean {
                    /**
                     * key : id
                     * relationOperator : =
                     * value : 10
                     */

                    private String key;
                    private String relationOperator;
                    private String value;

                    public String getKey() {
                        return key;
                    }

                    public void setKey(String key) {
                        this.key = key;
                    }

                    public String getRelationOperator() {
                        return relationOperator;
                    }

                    public void setRelationOperator(String relationOperator) {
                        this.relationOperator = relationOperator;
                    }

                    public String getValue() {
                        return value;
                    }

                    public void setValue(String value) {
                        this.value = value;
                    }
                }
            }

            public static class DataBean {
                private List<FieldValuesBean> fieldValues;

                public List<FieldValuesBean> getFieldValues() {
                    return fieldValues;
                }

                public void setFieldValues(List<FieldValuesBean> fieldValues) {
                    this.fieldValues = fieldValues;
                }

                public static class FieldValuesBean {
                    /**
                     * field : status
                     * value : 1
                     */

                    private String field;
                    private String value;

                    public String getField() {
                        return field;
                    }

                    public void setField(String field) {
                        this.field = field;
                    }

                    public String getValue() {
                        return value;
                    }

                    public void setValue(String value) {
                        this.value = value;
                    }
                }
            }
        }
    }
}
